|
|
|
|
|
|
|
src$ = GetNullsString(FileList)
dest$ = "A:\" & Chr$(0) & Chr$(0)
sh.hwnd = hwnd
sh.wFunc = FO_COPY
sh.pFrom = src$
sh.pTo = dest$
sh.fFlags = FOF_RENAMEONCOLLISION Or FOF_WANTMAPPINGHANDLE
sh.hNameMappings = 0
res = DoTheShellCall(sh, "Files are being copied to floppy")
If sh.hNameMappings <> 0 Then
' Copy the mapping structure into a structure we made up
RtlMoveMemory MappingInfo, ByVal sh.hNameMappings, _
Len(MappingInfo)
' Look at the data for each SHNAMEMAPPING
For mappingcounter = 1 To MappingInfo.mappingcount
RtlMoveMemory NameMapping, ByVal _
CLng(MappingInfo.MappingAddress + Len(NameMapping) _
* (mappingcounter - 1)), Len(NameMapping)
If NameMapping.cchOldPath <> 0 Then
OriginalName = String$(NameMapping.cchOldPath + 1, Chr$(0))
Call lstrcpy(ByVal OriginalName, ByVal _
NameMapping.pszOldPath)
End If
If NameMapping.cchNewPath Then
FinalName = String$(NameMapping.cchNewPath + 1, Chr$(0))
Call lstrcpy(ByVal FinalName, ByVal NameMapping.pszNewPath)
End If
lstFiles.AddItem OriginalName
lstFiles.AddItem "- renamed to -"
lstFiles.AddItem FinalName
Next mappingcounter
Call SHFreeNameMappings(sh.hNameMappings)
End If
End Sub |
|
|
|
|
|
|
|
|
A structure of type SomeSortOfHandle named MappingInfo is loaded from the address pointed to by the handle using the RtlMoveMemory function. The mappingcount field of this structure contains the number of SHNAMEMAPPING |
|
|
|
|
|